package com.design.alex.observer;

/**
 * @ClassName : OctalObserver
 * @Description : todo
 * @Author : Alex
 * @Date: 2020-02-19 17:24
 */
public class HexaObserver extends Observer {

    public HexaObserver(Subject subject) {
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("Hexa String: " + Integer.toHexString(subject.getState()).toUpperCase());
    }
}
